import sqlite3
conn = sqlite3.connect("user")
cur = conn.cursor()
cur.execute('create table if not exists student(number int(10),name varchar(20),score float)')
sql = 'insert into student(number,name,score) values(?,?,?)'
cur.execute(sql,('123', 'tom', '99'))
cur.execute(sql,('1234',"jack",'99'))
cur.execute("select * from student")
print(cur.fetchall())
cur.execute('update student set score = 100 where number = 20193323')#修改
cur.execute('select * from student')#读取
print(cur.fetchall())
cur.execute('delete from student where number = 528028')
cur.execute('select * from student')
print(cur.fetchall())
conn.commit()
conn.close()



